home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
game
/
role
/
ldmud-3.2-bin.lha
/
mud
/
doc
/
efun
/
shadow
< prev
next >
Wrap
Text File
|
2001-04-06
|
2KB
|
41 lines
SYNOPSIS
object shadow(object ob, int flag)
DESCRIPTION
If flag is non-zero then the current object will shadow ob. If
flag is 0 then either 0 will be returned or the object that is
shadowing ob.
The calling object must be permitted by the master object to
do the shadowing. In most installations, an object that
defines the function query_prevent_shadow() to return 1
can't be shadowed, and the shadow() function will return 0
instead of ob.
shadow() also fails if the calling object tries to shadow
a function that was defined as ``nomask'', if the program was
compiled with the #pragma no_shadow, or if the calling
object is already shadowing, is being shadowed, or has an
environment. Also the target ob must not be shadowing
something else.
If an object A shadows an object B then all call_other() to B
will be redirected to A. If object A has not defined the
function, then the call will be passed to B. There is only on
object that can call functions in B with call_other(), and
that is A. Not even object B can call_other() itself. All
normal (internal) function calls inside B will however remain
internal to B.
HISTORY
Up to 3.2.1@46, destructing a shadowed object also destructs
all shadows. Since 3.2.1@47, shadows may survive the
destruction of the shadowee (unless the prepare_destruct() in
the master object destructs them manually).
Since LDMud 3.2.8, programs may protect themselves from being
shadowed with the #pragma no_shadow.
SEE ALSO
query_shadowing(E), unshadow(E), query_allow_shadow(M)